/*
 * @Description: 单位导航包裹组件
 * @Author: Rfan
 * @Date: 2022-02-10 13:40:29
 * @LastEditTime: 2022-07-02 17:46:28
 */

import { useArrangementContext } from '../contexts/ArrangementContext';
import FolderTree from '@/components/FolderTree';

const NavSidebar = () => {
  const { setSelectFondId, setSelectAT, setSelectATId, setTreeNodeId } = useArrangementContext();

  const handleChange = ({ fondId, atId, atItem, nodeId }: any) => {
    setSelectFondId(fondId);
    setSelectAT(atItem);
    setSelectATId(atId);
    setTreeNodeId(nodeId);
  };

  return (
    <>
      <FolderTree onChange={handleChange} />
    </>
  );
};

export default NavSidebar;
